package com.mzkj.wanjulaile.mobile.api.modules.category.entity;

import com.mzkj.wanjulaile.mobile.api.common.entity.DataEntity;
import org.hibernate.validator.constraints.Length;

/**
 * 产品子分类Entity
 * @author ianly
 * @version 2016-10-09
 */
public class SubCategory extends DataEntity<SubCategory> {
	
	private static final long serialVersionUID = 1L;
	private ProductCategory productCategory;		// 主分类型
	private String name;		// 子分类名称
	private String sort;		// 排序
	private String logo;		//小图标
	/**1:身体锻炼 2:智力开发 3:情商培养*/
	private Integer type;		//锻炼能力类型
	
	public SubCategory() {
		super();
	}

	public SubCategory(String id){
		super(id);
	}

	public ProductCategory getProductCategory() {
		return productCategory;
	}

	public void setProductCategory(ProductCategory productCategory) {
		this.productCategory = productCategory;
	}

	@Length(min=1, max=255, message="子分类名称长度必须介于 1 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=11, message="排序长度必须介于 0 和 11 之间")
	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
}